package com.shujia.MR.Writable;


import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

public class WritableReducer extends Reducer<Text, Student, NullWritable, Student> {

    @Override
    protected void reduce(Text key, Iterable<Student> values, Reducer<Text, Student, NullWritable, Student>.Context context) throws IOException, InterruptedException {
        for (Student student : values) {
            context.write(NullWritable.get(),student);
        }
    }
}
